function Tiles( config ) {
	var image = new Image();
	var theme = '';
	var widht = 0;
	var height = 0;
	
	function initialize( config ) {
		if( typeof config != 'object' ) config = {};
		if( typeof config[ 'theme' ] == 'string' ) theme = config[ 'theme' ];
		if( typeof config[ 'width' ] == 'number' ) width = config[ 'width' ];
		if( typeof config[ 'height' ] == 'number' ) height = config[ 'height' ];
		
		if( typeof config[ 'callback' ] == 'callback' ) image.addEventListener( 'load', config[ 'callback' ], false );
		image.src = 'themes/' + theme + '/images/tiles.png'; 
	}
}

Tiles.TILE_0 = 0;
Tiles.TILE_1 = 1;
Tiles.TILE_2 = 2;
Tiles.TILE_3 = 3;
Tiles.TILE_4 = 4;
Tiles.TILE_5 = 5;
Tiles.TILE_6 = 6;
Tiles.TILE_7 = 7;
Tiles.TILE_8 = 8;
Tiles.TILE_BLANK = 9;
Tiles.TILE_FLAG = 10;
Tiles.TILE_INTERROGANT = 11;
Tiles.TILE_MINE = 12;
Tiles.TILE_BLOWED = 13;